package com.zhouchb.blog.service;

import com.zhouchb.blog.bean.Blog;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Author Zhouchb
 * @Create 2021-09-2021/9/7 :21:50
 * @Description
 */
public interface BlogService {
    public int saveBlogService(Blog blog);
    public List<Blog> getAllBlogDao();
    public Blog getBlogByIdService(Long id);
    public Blog getBlogByIdConvert(Long id);
    public List<Blog> listBlogService(Blog blog);
    //推荐 按时间排序
    public List<Blog> listRecommend(Integer size);
    public int updateBlogService(Long id,Blog blog);
    /*搜索*/
    public List<Blog> searchBlogService(String query);
    //根据typeId查询
    public List<Blog> searchAllByTypeIdBlogsService(Long typeId);
    //    查询图片是否存在
    public List<Blog> searchPictureService(String pictureName);
    public List<Blog> listBlogByTagIdService(Long tagId);

    public int delBlogService(Long id);
    //浏览量
    public int updateViews(Long blogId);

    /*archives*/
    public Map<String, List<Blog>> archivesBlog();
    public int blogTotalService();

}
